load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")

go_library(
    name = "publish-artifacts_lib",
    srcs = ["main.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/cmd/publish-artifacts",
    visibility = ["//visibility:private"],
    deps = [
        "//pkg/release",
        "@com_github_kr_pretty//:pretty",
    ],
)

go_binary(
    name = "publish-artifacts",
    embed = [":publish-artifacts_lib"],
    visibility = ["//visibility:public"],
)

go_test(
    name = "publish-artifacts_test",
    size = "small",
    srcs = ["main_test.go"],
    embed = [":publish-artifacts_lib"],
    deps = [
        "//pkg/release",
        "//pkg/testutils",
        "@com_github_alessio_shellescape//:shellescape",
        "@com_github_stretchr_testify//require",
    ],
)
